package com.itcase.interfacedemo.Demo01;

/*
Animal子类并实现Swim接口，一但实现接口就要重写接口的抽象方法
*/
public class Dog extends Animal implements Swim{
    public Dog() {
    }

    public Dog(String name, String color) {
        super(name, color);
    }

    @Override
    public void eat() {
        System.out.println("狗吃骨头");
    }

    @Override
    public void swimming() {
        System.out.println("狗刨式~~");
    }
}
